package com.winhxd.b2c.order.dao;

import com.winhxd.b2c.common.domain.order.condition.OrderAfterSaleCondition;
import com.winhxd.b2c.common.domain.order.condition.OrderDetailRefundCondition;
import com.winhxd.b2c.common.domain.order.enums.OrderDetailStatusEnum;
import com.winhxd.b2c.common.domain.order.model.OrderDetail;
import com.winhxd.b2c.common.domain.order.vo.OrderDetailVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public interface OrderDetailMapper {
    int deleteByPrimaryKey(Long id);

    int insert(OrderDetail record);

    int insertSelective(OrderDetail record);

    OrderDetail selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(OrderDetail record);

    int updateByOrderNoAndSkuId(OrderDetail record);

    int updateByPrimaryKey(OrderDetail record);

    /**
     * @author zhanghuan
     * @date  2018年10月26日 下午2:11:57
     * @Description 查询售后退换货商品信息
     */
    List<OrderDetailVO> selectOrderDetailByCondition(OrderAfterSaleCondition condition);

    /**
     *@author: zhangyanwei
     *@date: 2019/1/9 20:48
     *@Description: 根据订单编号和SKU_ID获取订单详情
     *@param: [condition]
     *@return: com.winhxd.b2c.common.domain.order.vo.OrderDetailVO
     */
    OrderDetail selectDetailByRefundCondition(OrderDetailRefundCondition condition);
    /**
    * @Description: 根据订单号获取订单商品信息
    * @Author: liuhanning
    * @Date:  2019-01-10 15:04
    */
    List<OrderDetailVO> selectListByOrderNo(@Param("orderNo")String orderNo);

    /**
     * 根据订单编号 明细状态查询
     * @param orderNo
     * @param
     * @return
     */
    List<OrderDetailVO> selectListByOrderNoAndStatus(@Param("orderNo") String orderNo, @Param("status") int status);
}